import React, { Component } from 'react';
import { View, Platform, SafeAreaView,Text } from 'react-native';

export default class Find extends Component{

    static navigationOptions = ()=>{
        return {
            title:"发现",
            tabBarOnPress: (sceen) => {
                const { defaultHandler, navigation } = sceen;
                const onTabBarPress = navigation.getParam("onTabBarPress",()=>{});
                if(onTabBarPress){
                    onTabBarPress();
                }
                defaultHandler();
            }
        }
    }

    
    setTitleNavigation = () => {
        const titleNavigation = this.props.screenProps.navigation;
        titleNavigation.setParams({
            "titleOptions": {
                title:"发现"
            }
        });

    }

    componentDidMount() {


        const navigation = this.props.navigation;
        navigation.setParams({
            onTabBarPress:()=>{
                this.setTitleNavigation();
            } 
        })
        this.setTitleNavigation();



    }

    render(){
        return (
            <View style={{flex:1,alignContent:"center",alignItems:"center",justifyContent:"center"}}>
                <Text>敬请期待...</Text>
            </View>
        )
    }
}